<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>获取缓存的配置信息</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.opcache-compile-file.html">« opcache_compile_file</a></li>
      <li style="float: right;"><a href="function.opcache-get-status.html">opcache_get_status »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.opcache.html">OPcache 函数</a></li>
    <li>获取缓存的配置信息</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.opcache-get-configuration" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">opcache_get_configuration</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.5.0, PHP 7, PHP 8, PECL ZendOpcache &gt; 7.0.2)</p><p class="refpurpose"><span class="refname">opcache_get_configuration</span> &mdash; <span class="dc-title">获取缓存的配置信息</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.opcache-get-configuration-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>opcache_get_configuration</strong></span>(): <span class="type"><span class="type">array</span>|<span class="type"><span class="type false">false</span></span></span></div>

  <p class="para rdfs-comment">
   该函数将返回缓存实例的配置信息。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.opcache-get-configuration-parameters">
  <h3 class="title">参数</h3>
  <p class="para">此函数没有参数。</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.opcache-get-configuration-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   返回一个数组，该数组里包含了缓存的初始化信息，黑名单和版本号。
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-function.opcache-get-configuration-errors">
  <h3 class="title">错误／异常</h3>
  <p class="para">
   在启用了 <code class="literal">opcache.restrict_api</code> 的情况下，如果当前路径在禁止规则里，将会出现 E_WARNING ；不会返回任何状态信息。
  </p>
 </div>

 
  <div class="refsect1 seealso" id="refsect1-function.opcache-get-configuration-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.opcache-get-status.html" class="function" rel="rdfs-seeAlso">opcache_get_status()</a> - 获取缓存的状态信息</span></li>
   </ul>
  </p>
 </div>


</div></div></div></body></html>